package com.easy.clickhouse;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.TimeUnit;

/**
 * 
 * @author jetlag
 *
 */
@Configuration
@ConfigurationProperties(prefix = "easy.clickhouse")
public class CKProperties {
    
    /** 集群定义*/
    private ClickHouseCluster cluster = new ClickHouseCluster();

    /** 连接检查间隔(默认:2)*/
    private int checkInterval = 2;

    /** 连接检查间隔单位*/
    private TimeUnit timeUnit = TimeUnit.SECONDS;

    public ClickHouseCluster getCluster() {
        return cluster;
    }

    public void setCluster(ClickHouseCluster cluster) {
        this.cluster = cluster;
    }

    public int getCheckInterval() {
        return checkInterval;
    }

    public void setCheckInterval(int checkInterval) {
        this.checkInterval = checkInterval;
    }

    public TimeUnit getTimeUnit() {
        return timeUnit;
    }

    public void setTimeUnit(TimeUnit timeUnit) {
        this.timeUnit = timeUnit;
    }
}
